package com.smart.tool.retry.core;

import com.smart.tool.retry.core.Attempt;

/**
 * @Author gao.gwq
 * @Version WaitStrategy.java, v 0.1 2023年09月18日 11:34 gao.gwq
 * @Description: TODO
 */
public interface WaitStrategy {
    /**
     * Returns the time, in milliseconds, to sleep before retrying.
     *
     * @param failedAttempt the previous failed {@code Attempt}
     * @return the sleep time before next attempt
     */
    long computeSleepTime(Attempt failedAttempt,int retryTimes);
}
